{{- if .Values.rbacManager.deploy }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: rbac-manager
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ template "crossplane.name" . }}
    {{- include "crossplane.labels" . | indent 4 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range $index, $secret := .Values.imagePullSecrets }}
- name: {{ $secret }}
{{- end }}
{{- end }}
{{- end}}